<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------


use think\facade\Route;

// 登录
Route::post('login', 'Manager/login');


// 管理员管理
Route::group('manager', function () {
    Route::get('page', 'page');
    Route::post('save', 'save');
    Route::post('edit_status', 'edit_status');
    Route::post('reset_password', 'reset_password');
})->prefix('manager/');

// 虚码管理
Route::group('virtual', function () {
    // 套餐列表
    Route::get('package_page', 'VirtualPackage/page');
    // 添加套餐
    Route::post('package_save', 'VirtualPackage/save');
    // 设置状态
    Route::post('package_edit_status', 'VirtualPackage/edit_status');
    //
});

// 商户管理
Route::group('merchant', function () {
    Route::post('save', 'merchant/create');                       // 添加商户
    Route::get('page', 'merchant/page');                          // 商户列表
    Route::get('info', 'merchant/info');                          // 商户信息
    Route::get('list', 'merchant/list');                          // 商户列表
    Route::post('reset_password', 'merchant/reset_pass');         // 重置密码
    Route::post('edit_status', 'merchant/edit_status');           // 修改状态
    Route::post('edit_end_time', 'merchant/edit_endTime');        // 修改结束时间
    Route::post('offline_pay', 'recharge/offline_pay');           // 线下支付
    Route::get('recharge_page', 'recharge/page');                 // 充值记录
    Route::get('recharge_info', 'recharge/info');                 // 充值记录
});


// 系统相关
Route::group('system', function () {
    Route::get('logger', 'system/system_log');                          // 系统日志
});

// 版本控制
Route::group('version', function () {
    Route::get('version_page', 'system_version/version_page');                          // 列表
    Route::post('version_edit_effect', 'system_version/version_edit_effect');           // 修改状态
    Route::get('version_info', 'system_version/version_info');                          // 详情
    Route::post('version_save', 'system_version/version_save');                         // 添加、修改
    Route::get('version_scene', 'system_version/version_scene');                        // 场景列表
});